<template>
  <div class="numbers-container" :class="dir" :style="{width}">
    <div class="overview-number" v-for="figure in list" :key="figure.key">
      <div class="number-box" :class="{round: round}">
        <div class="num-and-unit" :class="figure.color">
          <div class="num-text">{{ figure.num }}</div>
          <div class="num-unit" v-if="figure.unit">{{ figure.unit }}</div>
        </div>
      </div>
      <div class="number-desc">{{ figure.desc }}</div>
    </div>
  </div>
</template>

<script lang="ts">
import { Component, Prop, Vue } from 'vue-property-decorator'
import { Figure } from '@/api-scp/types'

@Component({
  name: 'FigureCards'
})
export default class extends Vue {
  @Prop({ default: 'horizontal' }) private dir!: 'horizontal'|'vertical'
  @Prop({ default: false }) private round!: boolean
  @Prop({ default: '100%' }) private width!: string
  @Prop({ default: [] }) private list!: Figure[]
}
</script>

<style lang="scss" scoped>

</style>
